package thread.pipedthread;

import java.io.IOException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;

public class Test {
	public static void main(String[] args) throws IOException {
		//管道刘的连接是可以互相换位置的
		PipedInputStream pi = new PipedInputStream();
		PipedOutputStream po = new PipedOutputStream(pi);
		Thread t = new ReadThread(pi);
		Thread w = new WriterThread(po);
		t.start();
		w.start();
	}
}
